import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;


@SuppressWarnings("serial")
public class beallit extends JPanel{
	public JButton vissza = new JButton("Vissza");
	JFrame frame;
	beallit set;
	Fomenu fomenu;
	
	public class MyActionListener2 implements ActionListener{
        public void actionPerformed(ActionEvent e){
        	set.setVisible(false);
        	frame.setContentPane(fomenu);
        	fomenu.setVisible(true);
        }
}
	
	beallit(JFrame keret, Fomenu fomenu){
		this.set = this;
		this.fomenu = fomenu;
		frame = keret;
		this.setBackground(Color.green);
		this.setLayout(new BorderLayout(3,5));
		this.add(vissza, BorderLayout.PAGE_END);
		vissza.addActionListener(new MyActionListener2());
	}

}
